/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.andersen.database.entity;

/**
 *
 * @author Corvus 11
 */
public class EmployeeEntity {
    
    private long id;
    
    private String name;
    
    private String surname;
    
    private String patronymic;
    
    private String position;
    
    private String skype;
    
    private String phone;
    
    private long officeId;
    
    private OfficeEntity office;

    private boolean discharged;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSurname() {
        return surname;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public String getPatronymic() {
        return patronymic;
    }

    public void setPatronymic(String patronymic) {
        this.patronymic = patronymic;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getSkype() {
        return skype;
    }

    public void setSkype(String skype) {
        this.skype = skype;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public long getOfficeId() {
        return officeId;
    }

    public void setOfficeId(long officeId) {
        this.officeId = officeId;
    }

    public OfficeEntity getOffice() {
        return office;
    }

    public void setOffice(OfficeEntity office) {
        this.office = office;
    }

    public boolean isDischarged() {
        return discharged;
    }

    public void setDischarged(boolean discharged) {
        this.discharged = discharged;
    }

    public String getSurnameNamePatronymic() {
        String snp = "";
        if (surname != null && !surname.isEmpty()) snp += surname + " ";
        if (name != null && !name.isEmpty()) snp += name + " ";
        if (patronymic != null && !patronymic.isEmpty()) snp += patronymic;
        return snp;
    }
    
    @Override
    public String toString() {
        return "EmployeeEntity{" + "id=" + id + 
                ", name=" + name + 
                ", surname=" + surname + 
                ", patronymic=" + patronymic + 
                ", position=" + position + 
                ", skype=" + skype + 
                ", phone=" + phone + 
                ", officeId=" + officeId + 
                ", office=" + office + 
                ", discharged=" + discharged + '}';
    }
    
}
